// testGUIDlg.h : header file
//

#pragma once

#include <string>
using namespace std;
#include <list>

typedef struct LayerBatch_tag
{
	string m_layerPath;
	string m_batchName;
}LAYERBATCH;

// CtestGUIDlg dialog
class CtestGUIDlg : public CDialog
{
// Construction
public:
	CtestGUIDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_TESTGUI_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;
	char m_szSelect[256];
	char m_szResult[256];
	int m_nInterval;
	int m_nEventID;
	int m_nPressEventID;
	int m_nDebugFlag;

	std::list<LAYERBATCH> m_batchNameList;
	std::list<LAYERBATCH> m_batchNameList_;

	CRITICAL_SECTION m_TimerLock;

	int m_nCountPrev;
	int m_nCount;
	int m_nCountNext;
	string m_iniArgPath1;

	DWORD m_dwDownTime;
	DWORD m_dwDownSetting;



	int scanLayer(const char *layerPath);
	void AutoScanLayer();
	bool IsLayerBatchNew(const char *layerPath, const char*batchName);
	void AddToAutoProcess();

	void HandleTimer();
	void Inspect();

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg HCURSOR OnQueryDragIcon();
	BOOL PreTranslateMessage(MSG* pMsg);
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedSelect();

private:
	//afx_msg void OnBnClickedButtonInspect();
public:
	afx_msg void OnBnClickedButtonStop();
public:
	afx_msg void OnBnClickedButtonAuto();
public:
	afx_msg void OnBnClickedButtonAutoAddLayer();
public:
	afx_msg void OnBnClickedButtonAddLot();
	afx_msg void OnBnClickedSave();
};
